Reverted the "kind" field to the previous value.
Added a new field named "crate_types".
Fixes https://github.com/rust-lang/cargo/issues/3654
After this PR `cargo metadata` would output:
```json
{
"packages": [
{
"targets": [
{
"kind": ["lib"],
"crate_types": ["lib"]
},
{
"kind": ["example"],
"crate_types": ["staticlib"]
}
]
}
]
}
```
I have added tests.